import pandas as pd
data = pd.read_excel('F:\\python\\第7章\\成绩表.xlsx', sheet_name=0, index_col='学号')
stu_sum = data.sum(axis=1)
class_mean = data.mean(axis=0)
data['个人总分'] = stu_sum
data.loc['科目平均分'] = class_mean
print(data)
